//
//  UIMessageInputView.h
//  Coding_My
//
//  Created by showXxie on 2017/8/31.
//  Copyright © 2017年 sooxie. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, UIMessageInputViewContentType) {
    UIMessageInputViewContentTypeTweet = 0,
    UIMessageInputViewContentTypePriMsg,
    UIMessageInputViewContentTypeTopic,
    UIMessageInputViewContentTypeTask
};

typedef NS_ENUM(NSInteger, UIMessageInputViewState) {
    UIMessageInputViewStateSystem,
    UIMessageInputViewStateEmotion,
    UIMessageInputViewStateAdd,
    UIMessageInputViewStateVoice
};


@protocol UIMessageInputViewDelegate;
@interface UIMessageInputView : UIView

@property (assign, nonatomic) BOOL isAlwaysShow;

@property (assign, nonatomic, readonly) UIMessageInputViewContentType contentType;

@property (nonatomic, weak) id<UIMessageInputViewDelegate> delegate;


+ (instancetype)messageInputViewWithType:(UIMessageInputViewContentType)type;

+ (instancetype)messageInputViewWithType:(UIMessageInputViewContentType)type placeHolder:(NSString *)placeHolder;

- (void)prepareToShow;

- (void)prepareToDismiss;
- (BOOL)isAndResignFirstResponder;

@end


@protocol UIMessageInputViewDelegate <NSObject>

@optional


- (void)messageInputView:(UIMessageInputView *)inputView sendText:(NSString *)text;
- (void)messageInputView:(UIMessageInputView *)inputView sendBigEmotion:(NSString *)emotionName;
- (void)messageInputView:(UIMessageInputView *)inputView sendVoice:(NSString *)file duration:(NSTimeInterval)duration;
- (void)messageInputView:(UIMessageInputView *)inputView addIndexClicked:(NSInteger)index;
- (void)messageInputView:(UIMessageInputView *)inputView heightToBottomChenged:(CGFloat)heightToBottom;


@end



